package com.qiyi.player.wonder.plugins.feedback.view.parts.networkfault
{
   import flash.display.Sprite;
   import feedback.NetworkErrorUI;
   import flash.text.TextField;
   import com.qiyi.player.wonder.common.ui.FastCreator;
   import flash.display.SimpleButton;
   
   public class NetWorkFaultView extends Sprite
   {
      
      public function NetWorkFaultView() {
         super();
         this.initPanel();
      }
      
      private static const TEXT_TITLE:String = "呃......播放失败了";
      
      private static const TEXT_HOME_PAGE:String = "帮助反馈";
      
      private static const TEXT_REFURBISH:String = "刷新试试";
      
      private static const TEXT_INSTALL_LINK:String = "安装<font color=\'#99cc33\'><a href=\'event:onTextEventClick\'><u> 爱奇艺影音 </u></a></font>可加速观影";
      
      private static const TEXT_FEEDBACK_LINK:String = "如果仍然无法观看，请 <a href=\'event:onTextEventClick\'><font color=\'#ffffff\'><u>反馈给我们</u></font></a> ";
      
      private static const TEXT_DESCRIBE:String = "您刚刚提交过反馈,我们会尽快处理";
      
      private var _networkErrorUI:NetworkErrorUI;
      
      private var _titleTF:TextField;
      
      private var _helpTF:TextField;
      
      private var _refurbishTF:TextField;
      
      private var _downLoadLinkTF:TextField;
      
      private var _describeTF:TextField;
      
      private var _feedBackLinkTF:TextField;
      
      private var _isFeedBacked:Boolean;
      
      private function initPanel() : void {
         this._networkErrorUI = new NetworkErrorUI();
         this._titleTF = FastCreator.createLabel(TEXT_TITLE,16777215,18);
         this._titleTF.x = 172;
         this._titleTF.y = 68;
         this._networkErrorUI.addChild(this._titleTF);
         this._helpTF = FastCreator.createLabel(TEXT_HOME_PAGE,16777215,16);
         this._helpTF.x = this._networkErrorUI.helpBtn.x + 32;
         this._helpTF.y = this._networkErrorUI.helpBtn.y + 4;
         this._helpTF.mouseEnabled = false;
         this._networkErrorUI.addChild(this._helpTF);
         this._refurbishTF = FastCreator.createLabel(TEXT_REFURBISH,16777215,16);
         this._refurbishTF.x = this._networkErrorUI.reFreshBtn.x + 32;
         this._refurbishTF.y = this._networkErrorUI.reFreshBtn.y + 4;
         this._refurbishTF.mouseEnabled = false;
         this._networkErrorUI.addChild(this._refurbishTF);
         this._feedBackLinkTF = FastCreator.createLabel(TEXT_FEEDBACK_LINK,10066329,12);
         this._feedBackLinkTF.x = 110;
         this._feedBackLinkTF.y = 190;
         this._networkErrorUI.addChild(this._feedBackLinkTF);
         this._downLoadLinkTF = FastCreator.createLabel(TEXT_INSTALL_LINK,16777215,12);
         this._downLoadLinkTF.x = 130;
         this._downLoadLinkTF.y = 215;
         this._networkErrorUI.addChild(this._downLoadLinkTF);
         this._describeTF = FastCreator.createLabel(TEXT_DESCRIBE,10066329,12);
         this._describeTF.x = 110;
         this._describeTF.y = 240;
         this._networkErrorUI.addChild(this._describeTF);
         this._describeTF.visible = false;
         addChild(this._networkErrorUI);
      }
      
      public function get downLoadClientTextLink() : TextField {
         return this._downLoadLinkTF;
      }
      
      public function get isFeedBacked() : Boolean {
         return this._isFeedBacked;
      }
      
      public function set isFeedBacked(param1:Boolean) : void {
         this._isFeedBacked = param1;
      }
      
      public function get helpBtn() : SimpleButton {
         return this._networkErrorUI.helpBtn;
      }
      
      public function get feedBackTextLink() : TextField {
         return this._feedBackLinkTF;
      }
      
      public function get reFreshBtn() : SimpleButton {
         return this._networkErrorUI.reFreshBtn;
      }
      
      public function get rejectMsg() : TextField {
         return this._describeTF;
      }
      
      public function onResize(param1:int, param2:int) : void {
         this._networkErrorUI.x = (param1 - this._networkErrorUI.width) / 2;
         this._networkErrorUI.y = (param2 - this._networkErrorUI.height) / 2;
      }
   }
}
